package com.subsequent.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.subsequent.dto.AssessQueryDTO;
import com.subsequent.pojo.Assess;
import com.subsequent.service.AssessService;
import com.subsequent.mapper.AssessMapper;
import com.subsequent.vo.AssessVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 不.凌
* @description 针对表【assess】的数据库操作Service实现
* @createDate 2025-05-08 15:55:08
*/
@Service
public class AssessServiceImpl extends ServiceImpl<AssessMapper, Assess>
    implements AssessService{
    @Autowired
    private AssessMapper assessMapper;
    @Override
    public PageInfo<AssessVO> getAssessList(AssessQueryDTO assessQueryDTO) {
        PageHelper.startPage(assessQueryDTO.getPageNum(), assessQueryDTO.getPageSize());
        List<AssessVO> list = assessMapper.getAssessList(assessQueryDTO);
        PageInfo<AssessVO> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }

    @Override
    public List<AssessVO> getByAssess(Integer assessId) {
        List<AssessVO> byAssess = assessMapper.getByAssess(assessId);
        return byAssess;
    }

    @Override
    public int updateStatus(AssessVO assessVO) {
        int update = assessMapper.updateStatus(assessVO);
        return update;
    }
}




